-- GENERATED SPELL FOR [Deathspeaker Selendre] --


function spell0_10827(pUnit, Event) --@Curse of Tongues,n/a--
pUnit:FullCastSpellOnTarget(13338,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10827', 15348, 1)
end

function spell1_10827(pUnit, Event) --@Drain Life,Drain--
pUnit:FullCastSpellOnTarget(17173,pUnit:GetRandomPlayer(0))
pUnit:RegisterEvent('Sorts_10827', 5000, 1)
end

function spell2_10827(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(12471,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10827', 3000, 1)
end

function Sorts_10827(pUnit, Event)
local choix_sorts_10827 = math.random(0, 2)
if choix_sorts_10827 == 0 then
pUnit:RegisterEvent('spell0_10827', 1, 1)
end
if choix_sorts_10827 == 1 then
pUnit:RegisterEvent('spell1_10827', 1, 1)
end
if choix_sorts_10827 == 2 then
pUnit:RegisterEvent('spell2_10827', 1, 1)
end
end

function mob10827_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10827', math.random(1500, 3000), 1)
end

function mob10827_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10827_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10827_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10827, 1, 'mob10827_Action')
RegisterUnitEvent(10827, 2, 'mob10827_Leave')
RegisterUnitEvent(10827, 3, 'mob10827_Kill')
RegisterUnitEvent(10827, 4, 'mob10827_Die')
